<%--
  Created by IntelliJ IDEA.
  Author: WaveHi
  Contact: HJBWaveHi@163.com
  Date: 25/9/2021
  Time: 上午 10:35
  Description: 
  Version: 1.0
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <%@include file="/page/common/head.jsp"%>
    <title>user_display</title>
</head>
<body>
<form id="user-display-form" action="userServlet" method="post">
    <input type="hidden" name="action" value="filter"/>
    <input type="text" name="username" value="${requestScope.username}" placeholder="Username"/>
    <input type="text" name="id" value="${requestScope.id}" placeholder="Value id of user should be greater than"/>
    <button type="submit" form="user-display-form">Query</button>
</form>
<table>
    <tr>
        <td>序号</td>
        <td>用户名</td>
        <td>密码</td>
        <td colspan="2">操作</td>
    </tr>
    <c:forEach items="${requestScope.page.datas}" var="user" varStatus="userStatus">
        <tr>
            <td>${user.id}</td>
            <td>${user.username}</td>
            <td>${user.password}</td>
            <td><a href="userServlet?action=delete&id=${user.id}">delete</a></td>
            <td><a href="userServlet?action=getUser&id=${user.id}">update</a></td>
        </tr>
    </c:forEach>
    <tr>
        <td colspan="5">
            <%@include file="/page/common/nav_page.jsp" %>
        </td>
    </tr>
</table>
</body>
</html>
